﻿#include <iostream>
#include <QApplication>
#include <QFile>
#include <QTextStream>
#include <QStyleFactory>
#include "mainwindow.h"
#include "MainWindowDemo.h"
#include "BaseModule/AppManager.h"

int main(int argc, char* argv[])
{
    // 屏幕适配
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
    QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
    QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
    QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#else
    //根据实际屏幕缩放比例更改
    //qputenv("QT_SCALE_FACTOR", "1.5");
#endif
#endif


    QApplication _app(argc, argv);


    //MainWindow w;
    //w.show();

    //
    MainWindowDemo _window;
    _window.show();
    AppManagerInstance->init(&_window);


    return _app.exec();
}
